home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / patch / ps3c.lha / 3.0cUpdate / PostScript.LHA / PostScript.prolog < prev   
Text File  |  1994-11-01  |  21KB  |  898 lines

  1. %%BeginProlog
  2. % $VER: PostScript.prolog 1.0c (29.10.94)
  3. % fixed picstr problem in BeginRGBBitmap (7.10.94)
  4. % added font reencoding support (29.10.94)
  5. %Copyright 1994 Soft-Logik Publishing Corp.
  6.  
  7. /AsphaltDict dup 153 dict def load begin
  8.  
  9. %
  10. % basic definitions
  11. %
  12. /bdef {bind def}bind def
  13. /xdef {exch def}bdef
  14. /ldef {load def}bdef
  15. /dmatrix matrix def
  16. /cmatrix matrix def
  17. /omatrix matrix def
  18.  
  19. /deltax 0 def
  20. /deltay 0 def
  21. /slant 0 def
  22. /twist 0 def
  23. /xscl 0 def
  24. /yscl 0 def
  25. /bang 0 def
  26. /eang 0 def
  27.  
  28. /tilescalex 0 def
  29. /tilescaley 0 def
  30. /bh 0 def
  31. /bv 0 def
  32.  
  33. %
  34. % drawing definitions
  35. %
  36. /sclm [0 0 0 0 0 0] def
  37. /sr {
  38.  /twist xdef
  39.  /slant xdef
  40.  /deltay xdef
  41.  /deltax xdef
  42.  cmatrix setmatrix deltax deltay translate
  43.  sclm 0 twist cos put
  44.  sclm 1 twist sin put
  45.  sclm 2 slant sin neg put
  46.  sclm 3 slant cos put
  47.  sclm concat
  48.  /omatrix omatrix currentmatrix def
  49. }bdef
  50.  
  51. /scl {
  52.  deltay sub exch
  53.  deltax sub exch
  54.  transform round .2 add exch round .2 add exch itransform
  55. }bdef
  56.  
  57. %
  58. %
  59. %
  60. /PGSEncoding 256 array def
  61. % duplicates: acute, quoteleft, quoteright
  62. % 000-007 not added yet
  63. /.notdef        /dotlessi        /grave            /acute            /circumflex        /tilde            /breve            /dotaccent
  64. % 010-017 not added yet
  65. /ring            /hungarumlaut    /ogonek            /caron            /.notdef        /.notdef        /.notdef        /.notdef
  66. % 020-027 not added yet
  67. /quotedblbase    /quotesinglbase    /quotesingle    /quoteleft        /quoteright        /.notdef        /.notdef        /.notdef
  68. % 030-037 not added yet
  69. /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef
  70. % 040-047
  71. /space            /exclam            /quotedbl        /numbersign        /dollar            /percent        /ampersand        /quoteright
  72. % 050-057
  73. /parenleft        /parenright        /asterisk        /plus            /comma            /minus            /period            /slash
  74. % 060-067
  75. /zero            /one            /two            /three            /four            /five            /six            /seven
  76. % 070-077
  77. /eight            /nine            /colon            /semicolon        /less            /equal            /greater        /question
  78. % 100-107
  79. /at                /A                /B                /C                /D                /E                /F                /G
  80. % 110-117
  81. /H                /I                /J                /K                /L                /M                /N                /O
  82. % 120-127
  83. /P                /Q                /R                /S                /T                /U                /V                /W
  84. % 130-137
  85. /X                /Y                /Z                /bracketleft    /backslash        /bracketright    /asciicircum    /underscore
  86. % 140-147
  87. /quoteleft        /a                /b                /c                /d                /e                /f                /g
  88. % 150-157
  89. /h                /i                /j                /k                /l                /m                /n                /o
  90. % 160-167
  91. /p                /q                /r                /s                /t                /u                /v                /w
  92. % 170-177
  93. /x                /y                /z                /braceleft        /bar            /braceright        /asciitilde        /.notdef
  94. % 200-207
  95. /perthousand    /florin            /notequal        /infinity        /lessequal        /greaterequal    /mu                /.notdef
  96. % 210-217
  97. /ellipsis        /endash            /emdash            /quotedblleft    /quotedblright    /guilsinglleft    /guilsinglright    /pi                
  98. % 220-227
  99. /fraction        /dagger            /daggerdbl        /trademark        /bullet            /fi                /fl                /Ydieresis        
  100. % 230-237 not added yet
  101. /Lslash            /lslash            /OE                /oe                /Scaron            /scaron            /Zcaron            /zcaron            
  102. % 240-247
  103. /space            /exclamdown        /cent            /sterling        /currency        /yen            /brokenbar        /section
  104. % 250-257
  105. /dieresis        /copyright        /ordfeminine    /guillemotleft    /logicalnot        /hyphen            /registered        /macron
  106. % 260-267
  107. /degree            /plusminus        /twosuperior    /threesuperior    /acute            /mu                /paragraph        /periodcenter
  108. % 270-277
  109. /cedilla        /onesuperior    /ordmasculine    /guillemotright    /onequarter        /onehalf        /threequarters    /questiondown
  110. % 300-307
  111. /Agrave            /Aacute            /Acircumflex    /Atilde            /Adieresis        /Aring            /AE                /Ccedilla
  112. % 310-317
  113. /Egrave            /Eacute            /Ecircumflex    /Edieresis        /Igrave            /Iacute            /Icircumflex    /Idieresis
  114. % 320-327
  115. /Eth            /Ntilde            /Ograve            /Oacute            /Ocircumflex    /Otilde            /Odieresis        /multiply
  116. % 330-337
  117. /Oslash            /Ugrave            /Uacute            /Ucircumflex    /Udieresis        /Yacute            /Thorn            /germandbls
  118. % 340-347
  119. /agrave            /aacute            /acircumflex    /atilde            /adieresis        /aring            /ae                /ccedilla
  120. % 350-357
  121. /egrave            /eacute            /ecircumflex    /edieresis        /igrave            /iacute            /icircumflex    /idieresis
  122. % 360-367
  123. /eth            /ntilde            /ograve            /oacute            /ocircumflex    /otilde            /odieresis        /divide
  124. % 370-377
  125. /oslash            /ugrave            /uacute            /ucircumflex    /udieresis        /yacute            /thorn            /ydieresis
  126. PGSEncoding 0 256 getinterval astore pop
  127.  
  128. %
  129. % - patternpath -
  130. %
  131. /patternpath { %bdef
  132.   /mypatternfont findfont begin FontDict /ctm get setmatrix
  133.   currentdict setfont
  134.  
  135.   FontDict begin
  136.     FontMatrix concat
  137.     width 0 dtransform
  138.     round width div exch round width div exch
  139.     0 height dtransform
  140.     round height div exch
  141.     round height div exch
  142.     0 0 transform round exch round exch
  143.     ptm astore setmatrix
  144.     pathbbox
  145.     height div ceiling height mul 4 1 roll
  146.     width div ceiling width mul 4 1 roll
  147.     height div floor height mul 4 1 roll
  148.     width div floor width mul 4 1 roll
  149.     2 index sub height div ceiling cvi exch
  150.     3 index sub width div ceiling cvi exch
  151.     4 2 roll moveto
  152.     FontMatrix ptm invertmatrix pop
  153.     { %repeat
  154.       gsave
  155.       ptm concat
  156.       dup str length idiv {str show}repeat
  157.       dup str length mod str exch 0 exch getinterval show
  158.       grestore
  159.       0 height rmoveto
  160.     }repeat
  161.     pop
  162.   end end
  163. }bdef
  164.  
  165. %
  166. % - patternfill -
  167. %
  168. /patternfill { %bdef
  169.   gsave
  170.   1 setgray
  171.   fill
  172.   grestore
  173.  
  174.   gsave
  175.   clip patternpath
  176.   grestore
  177.   newpath
  178. }bdef
  179.  
  180. %
  181. % - patterneofill -
  182. %
  183. /patterneofill { %bdef
  184.   gsave
  185.   1 setgray
  186.   eofill
  187.   grestore
  188.  
  189.   gsave
  190.   eoclip patternpath
  191.   grestore
  192.   newpath
  193. }bdef
  194.  
  195. %
  196. % - patternstroke -
  197. %
  198. /patternstroke { %bdef
  199.   strokepath
  200.   gsave
  201.   1 setgray
  202.   eofill
  203.   grestore
  204.  
  205.   gsave
  206.   clip patternpath
  207.   grestore
  208.   newpath
  209. }bdef
  210.  
  211.  
  212. %
  213. % - N -
  214. %
  215. /N /newpath ldef
  216.  
  217. %
  218. % x y M -
  219. %
  220. /M {scl moveto}bdef
  221.  
  222. %
  223. % x y L -
  224. %
  225. /L {scl lineto}bdef
  226.  
  227. %
  228. % cx1 cy1 cx2 cy2 px2 py2 C -
  229. %
  230. /C {scl 6 2 roll scl 6 2 roll scl 6 2 roll curveto}bdef
  231.  
  232. %
  233. % cx cy rx ry ba ea slant twist A -
  234. %
  235. /A {
  236.  /twist xdef
  237.  /slant xdef
  238.  /eang xdef
  239.  /bang xdef
  240.  /yscl xdef
  241.  /xscl xdef
  242.  scl translate xscl yscl scale
  243.  sclm 0 twist cos put
  244.  sclm 1 twist sin put
  245.  sclm 2 slant sin neg put
  246.  sclm 3 slant cos put
  247.  sclm concat
  248.  0 0 1 bang eang arc omatrix setmatrix
  249. }bdef
  250.  
  251. %
  252. % cx cy rx ry ba ea slant twist AN -
  253. %
  254. /AN {
  255.  /twist xdef
  256.  /slant xdef
  257.  /eang xdef
  258.  /bang xdef
  259.  /yscl xdef
  260.  /xscl xdef
  261.  scl translate xscl yscl scale
  262.  sclm 0 twist cos put
  263.  sclm 1 twist sin put
  264.  sclm 2 slant sin neg put
  265.  sclm 3 slant cos put
  266.  sclm concat
  267.  0 0 1 bang eang arcn omatrix setmatrix
  268. }bdef
  269.  
  270. %
  271. % - CP -
  272. %
  273. /CP {closepath}bdef
  274.  
  275. %
  276. % fill defines
  277. %
  278. /SG /setgray ldef
  279.  
  280. %
  281. % /fillproc c m y k CMYK -
  282. %
  283. /CMYK {
  284.  setcmykcolor load exec
  285. }def
  286.  
  287. %
  288. % /fillproc sx sy l w angle /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKGRAD -
  289. %
  290. /CMYKGRAD {
  291.  /tc2 xdef
  292.  /tc1 xdef
  293.  /ramp exch ldef
  294.  /angle xdef
  295.  pop pop pop pop
  296.  /fillproc exch ldef
  297.  
  298.  gsave cmatrix setmatrix flattenpath clip 
  299.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  300.  angle 0 lt{/angle angle 360 add def}if
  301.  angle 180 gt{/angle angle 180 sub def tc1 tc2 /tc1 xdef /tc2 xdef}if
  302.  angle 90 gt{ /quad {ury exch sub}bdef tc1 tc2 /tc1 xdef /tc2 xdef}{ /quad {lly add}bdef}ifelse
  303.  /l urx llx sub def
  304.  /w ury lly sub def
  305.  /v angle dup 90 gt{90 sub neg 90 add}if dup sin l mul exch cos w mul add 2 mul def
  306.  /d angle dup 90 gt{90 sub neg 90 add}if dup sin w mul exch cos l mul add def
  307.  /steps d 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  308.  /dd d steps div def
  309.  
  310.  0 1 steps
  311.  {
  312.   steps div dup /frac xdef ramp /rfrac xdef
  313.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  314.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  315.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  316.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add setcmykcolor
  317.  
  318.   newpath gsave
  319.   l frac mul llx add
  320.   w frac mul quad translate angle rotate 
  321.   dd 2 div neg v 2 div neg moveto
  322.   0 v rlineto dd 0 rlineto 0 v neg rlineto closepath
  323.   fillproc grestore
  324.  }for
  325.  
  326.  grestore
  327.  
  328. }def
  329.  
  330. %
  331. % this is the orginal
  332. %
  333. %/CMYKGRAD {
  334. % /tc2 xdef
  335. % /tc1 xdef
  336. % /ramp exch ldef
  337. % /angle xdef
  338. % /w xdef /l xdef scl /sy xdef /sx xdef
  339. % /fillproc exch ldef
  340. %
  341. % /steps 256 def
  342. % /dx l steps div def
  343. %
  344. % gsave clip
  345. %
  346. % sx sy translate angle rotate
  347. %
  348. % 0 1 steps
  349. % {
  350. %  steps div dup /frac xdef ramp /rfrac xdef
  351. %  tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  352. %  tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  353. %  tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  354. %  tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add setcmykcolor
  355. %  newpath l frac mul w -2 div moveto 0 w rlineto dx 0 rlineto 0 w neg rlineto closepath fillproc
  356. % }for
  357. %
  358. % grestore
  359. %
  360. %}def
  361.  
  362. %
  363. % /fillproc xc yc radius /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKRADIAL -
  364. %
  365. /CMYKRADIAL {
  366.  /tc2 xdef
  367.  /tc1 xdef
  368.  /ramp exch ldef
  369.  /radius xdef
  370.  scl /yc xdef /xc xdef
  371.  /fillproc exch ldef
  372.  
  373.  /steps 256 def
  374.  
  375.  gsave clip
  376.  
  377.  steps -1 0
  378.  {
  379.   steps div dup /frac xdef ramp /rfrac xdef
  380.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  381.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  382.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  383.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add setcmykcolor
  384.   newpath xc yc radius frac mul 0 360 arc fillproc
  385.  }for
  386.  
  387.  grestore
  388.  
  389. }def
  390.  
  391. %
  392. % /fillproc inset /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKSHAPE -
  393. %
  394. /CMYKSHAPE {
  395.  /tc2 xdef
  396.  /tc1 xdef
  397.  /ramp exch ldef
  398.  /xc xdef
  399.  /fillproc exch ldef
  400.  
  401.  /steps 30 def
  402.  
  403.  currentflat mark currentflat
  404.  {
  405.   {
  406.    dup setflat mark clip
  407.  
  408.    tc1 0 get tc1 1 get tc1 2 get tc1 3 get setcmykcolor
  409.    currentflat mark currentflat
  410.    {
  411.     dup setflat mark
  412.     {fillproc}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  413.    }loop
  414.    cleartomark setflat
  415.  
  416.    steps -1 0
  417.    {
  418.     steps div dup /frac xdef ramp /rfrac xdef
  419.     tc1 0 get tc2 0 get sub rfrac mul tc2 0 get add
  420.     tc1 1 get tc2 1 get sub rfrac mul tc2 1 get add
  421.     tc1 2 get tc2 2 get sub rfrac mul tc2 2 get add
  422.     tc1 3 get tc2 3 get sub rfrac mul tc2 3 get add setcmykcolor
  423.     []0 setdash xc 2 mul frac mul setlinewidth
  424.  
  425.     currentflat mark currentflat
  426.     {
  427.      dup setflat mark
  428.      {ST}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  429.     }loop
  430.     cleartomark setflat
  431.  
  432.    }for
  433.   }
  434. %  gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  435.   gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {exit}if}{cleartomark exit}ifelse
  436.  }loop
  437.  cleartomark setflat
  438. }def
  439.  
  440.  
  441. %
  442. % - S -
  443. %
  444. /S {
  445.  /MF /eofill ldef
  446.  /MS /fill ldef
  447.  /ST /stroke ldef
  448. }bdef
  449.  
  450. %
  451. % <pattern> P -
  452. %
  453. /P {
  454.  /pattern xdef
  455.  /mypatternfont findfont begin
  456.  FontDict begin
  457.  true
  458.   0 1 patterncount 1 sub {
  459.    dup patterns exch get pattern eq
  460.       {0 1 str length 1 sub{str exch 2 index put}for pop pop false exit}
  461.    if
  462.    pop
  463.  }for
  464.  {
  465.    patterns patterncount pattern put
  466.     0 1 str length 1 sub {str exch patterncount put}for
  467.    /patterncount patterncount 1 add def
  468.  }if
  469.  end
  470.  end
  471.  /MF /patterneofill ldef
  472.  /MS /patternfill ldef
  473.  /ST /patternstroke ldef
  474. }bdef
  475.  
  476. %
  477. % join miterlimit cap [dashpattern] width ST -
  478. %
  479. /st {
  480.  setlinewidth 0 setdash setlinecap
  481.  2 div sin 1 exch div setmiterlimit
  482.  setlinejoin strokepath
  483. }bdef
  484.  
  485. %
  486. % endfunc scale angle x y LNE -
  487. %
  488. /LNE {
  489.  scl translate rotate dup scale
  490.  load exec
  491.  omatrix setmatrix
  492. }bdef
  493.  
  494. %
  495. % screen spot functions
  496. %
  497. /SSNewDot {180 mul cos exch 180 mul cos add 2 div}bdef
  498. /SSDot {dup mul exch dup mul add 1.0 exch sub}bdef
  499. /SSRing {dup mul exch dup mul add 1.0 exch sub abs 1.0 exch sub}bdef
  500. /SSDonut {dup mul exch dup mul add sqrt .5 sub abs 1.0 exch sub}bdef
  501. /SSLine {exch pop abs}bdef
  502. /SSTriangle {2 exch sub exch abs 2 mul sub 3 div}bdef
  503. /SSPropeller {/y xdef /x xdef y x .001 add atan cvi 72 mod 72 sub abs 72 div y y mul x x mul add 1 exch sub add 2 div}bdef
  504.  
  505. %
  506. % fountain blend functions
  507. %
  508. /FBLinear {}bdef
  509. /FBInvLinear {1 exch sub}bdef
  510. /FBLog {9 mul 1 add log}bdef
  511. /FBInvLog {9 mul 1 add log 1 exch sub}bdef
  512. /FBSin {180 mul sin}bdef
  513. /FBInvSin {180 mul sin 1 exch sub}bdef
  514. /FBSaw {2 mul dup 1 gt {2 exch sub}if}bdef
  515. /FBInvSaw {2 mul dup 1 gt {2 exch sub}if 1 exch sub}bdef
  516.  
  517. %
  518. % line end functions
  519. %
  520. /LERound {0 0 moveto 0 0 .5 -90 90 arc closepath}bdef
  521. /LEArrow {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  522. /LEArrow1 {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  523. /LEArrow2 {0 0 moveto -2 2 lineto 6 0 lineto -2 -2 lineto closepath}bdef
  524. /LEArrow3 {6 0 moveto -3 0 2.31 300 60 arc closepath}bdef
  525. /LEArrow4 {-1 0 moveto -4 2 .5 240 60 arcn 0 0 .5 60 300 arcn -4 -2 .5 300 120 arcn closepath}bdef
  526. /LESpike1 {0 .5 moveto .5 2 lineto 1 .5 lineto 6 0 lineto 1 -.5 lineto .5 -2 lineto 0 -.5 lineto closepath}bdef
  527. /LESpike2 {0 .5 moveto 2 2 lineto 6 0 lineto 2 -2 lineto 0 -.5 lineto closepath}bdef
  528. /LEFeather1 {-2 0 moveto 0 2 lineto 6 2 lineto 4 0 lineto 6 -2 lineto 0 -2 lineto closepath}bdef
  529. /LEFeather2 {0 -2 moveto 0 0 2 270 90 arcn 6 0 2 90 270 arc closepath}bdef
  530. /LEBox {-2 0 moveto -2 2 lineto 2 2 lineto 2 -2 lineto -2 -2 lineto closepath}bdef
  531. /LEDiamond {-2 0 moveto 0 2 lineto 2 0 lineto 0 -2 lineto closepath}bdef
  532. /LEBall {0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  533. /LEEllipse {2 1 scale 0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  534.  
  535. %
  536. % freq angle spot SS -
  537. %
  538. /ss {
  539.  load setscreen
  540. }bdef
  541.  
  542. /installcolor {
  543.  dup type /stringtype eq {pop dangle}if exch dup type /stringtype eq {pop dfreq}if exch /dspot load setscreen
  544.  
  545.  /sepmode xdef
  546.  
  547.  sepmode 1 eq {
  548.   /setcmykcolor{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef
  549.   /setgray /SG load def
  550.  }if
  551.  
  552.  sepmode 2 eq {
  553.   systemdict /setcmykcolor known not {/setcmykcolor {1 sub 4 1 roll 3 {3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef}if
  554.   /setgray /SG load def
  555.  }if
  556.  
  557.  sepmode 3 eq {
  558.   /sepcolor xdef
  559.   sepcolor 0 get 0 ne {/setcmykcolor {pop pop pop 1 exch sub SG}bdef /setgray {pop 1 SG}bdef}if
  560.   sepcolor 1 get 0 ne {/setcmykcolor {pop pop 1 exch sub SG pop}bdef /setgray {pop 1 SG}bdef}if
  561.   sepcolor 2 get 0 ne {/setcmykcolor {pop 1 exch sub SG pop pop}bdef /setgray {pop 1 SG}bdef}if
  562.   sepcolor 3 get 0 ne {/setcmykcolor {1 exch sub SG pop pop pop}bdef /setgray /SG load def}if
  563.  }if
  564.  
  565.  sepmode 4 eq {
  566.   /sepcolor xdef
  567.   /setcmykcolor {
  568.    sepcolor 3 get eq exch
  569.    sepcolor 2 get eq and exch
  570.    sepcolor 1 get eq and exch
  571.    sepcolor 0 get eq and {0 SG}{1 SG}ifelse}bdef
  572.   sepcolor 3 get 1 eq sepcolor 2 get 0 eq and sepcolor 1 get 0 eq and sepcolor 0 get 0 eq and {/setgray /SG load def}{/setgray {pop 1 SG}bdef}ifelse
  573.  }if
  574.  
  575.  currentscreen /cspot xdef /cangle xdef /cfreq xdef
  576. }bdef
  577.  
  578. %
  579. % #copies BEGINDOCUMENT -
  580. %
  581. /BeginDocument {
  582.  /#copies xdef
  583.  
  584.   7 dict begin
  585.     /FontDict 12 dict def
  586.     FontDict begin
  587.       /key /mypatternfont def
  588.       /patterns 256 array def
  589.       /patterncount 0 def
  590.       /char 0 def
  591.       /mtx [300 72 div 0 0 300 72 div 0 0] matrix invertmatrix def
  592.       /height 30 def
  593.       /width 30 def
  594.       /ctm matrix currentmatrix def
  595.       /ptm matrix identmatrix def
  596.       /str 32 string def
  597.     end
  598.     /FontBBox [0 0 FontDict /width get FontDict /height get] def
  599.     /FontMatrix FontDict /mtx get def
  600.     /Encoding 256 array 0 1 255 {1 index exch dup 3 string cvs cvn put}for def
  601.     /FontType 3 def
  602.     /BuildChar { %def
  603.       exch begin
  604.       FontDict begin
  605.       /char xdef
  606.        width 0 0 0 width height setcachedevice
  607.       width height scale 8 8 true [8 0 0 -8 0 8] {patterns char get}imagemask
  608.       end end
  609.     }def
  610.     FontDict /key get currentdict definefont pop
  611.   end
  612.  
  613.  /dmatrix dmatrix currentmatrix def
  614.  currentscreen /dspot xdef /dangle xdef /dfreq xdef
  615.  
  616. }bdef
  617.  
  618. %
  619. % /newfontname /fontname RE -
  620. %
  621. /RE {
  622.  findfont dup length dict begin { %forall
  623.   1 index /FID ne {def}{pop pop}ifelse
  624.  }forall
  625.  /Encoding PGSEncoding def
  626.  /FontName 1 index def
  627.  currentdict definefont pop
  628.  end
  629. }bdef
  630.  
  631. %
  632. % /fontname xscale yscale F -
  633. %
  634. /f {
  635.  /yscale xdef /xscale xdef
  636.  findfont [xscale 0 0 yscale 0 0] makefont setfont
  637. }bdef
  638.  
  639. %
  640. % (string) s1 -
  641. %
  642. /s1 {show}bdef
  643.  
  644. %
  645. % (string) kernamt s2 -
  646. %
  647. /s2 {exch 0 exch ashow}bdef
  648.  
  649. %
  650. % (string) skernamt s3 -
  651. %
  652. /s3 {exch 0 exch 32 exch widthshow}bdef
  653.  
  654. %
  655. % (string) skernamt kernamt s4 -
  656. %
  657. /s4 {0 exch 32 exch 0 6 -1 roll awidthshow}bdef
  658.  
  659. %
  660. % - ENDOCUMENT -
  661. %
  662. /EndDocument {
  663. }bdef
  664.  
  665. %
  666. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) tilew tileh landscape scaleh scalex paperw paperh BEGINTILE -
  667. %
  668. /BeginTile {
  669.  2 div exch 2 div exch translate
  670.  /tilescaley xdef /tilescalex xdef tilescalex tilescaley scale
  671.  {-90 rotate}if
  672.  -2 div exch -2 div exch translate
  673.  
  674.  installcolor
  675.  
  676.  /cmatrix cmatrix currentmatrix def
  677.  
  678. % default to solid fills
  679.  S
  680. }bdef
  681.  
  682. %
  683. % angle cx cy cropmark -
  684. %
  685. /cropmark {
  686.   gsave translate 1 tilescalex div 1 tilescaley div scale rotate
  687.   .3 setlinewidth newpath
  688.   bh 5 add 0 moveto 20 0 rlineto
  689.   0 bv 5 add moveto 0 20 rlineto
  690.   stroke grestore
  691. }bdef
  692.  
  693. %
  694. % dx dy cx cy regmark -
  695. %
  696. /regmark {
  697.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  698.   .3 setlinewidth newpath
  699.   10 0 moveto 0 0 10 0 360 arc
  700.   1 SG fill
  701.   8 0 moveto 0 0 8 0 360 arc
  702.   -10 0 moveto 10 0 lineto 0 -10 moveto 0 10 lineto
  703.   0 SG stroke
  704.   4 0 moveto 0 0 4 0 360 arc
  705.   fill
  706.   -4 0 moveto 4 0 lineto 0 -4 moveto 0 4 lineto
  707.   1 SG stroke
  708.   grestore
  709. }bdef
  710.  
  711. %
  712. % dx dy cx cy slurgauge -
  713. %
  714. /slurgauge {
  715.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  716.   .3 setlinewidth newpath
  717.   0 0 10 0 360 arc
  718.   1 SG fill
  719.   0 0 10 0 360 arc
  720.   0 SG stroke
  721.   36 { 1 0 moveto 0 0 10 -2.5 2.5 arc fill 10 rotate}repeat
  722.   grestore
  723. }bdef
  724.  
  725.  
  726. /boxit {newpath moveto 14 0 rlineto 0 -14 rlineto -14 0 rlineto closepath}def
  727.  
  728. %
  729. % angle dx dy cx cy colorstrip -
  730. %
  731. /colorstrip {
  732.   gsave translate 1 tilescalex div 1 tilescaley div scale translate rotate
  733.  
  734.   /Courier findfont 6 scalefont setfont
  735.  
  736.   sepmode 1 eq {
  737.     0 8 translate
  738.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  739.    }if
  740.  
  741.   sepmode 2 eq sepmode 3 eq or {
  742.     gsave 320 15 translate
  743.     0 0 boxit .5 .41 .41 0 setcmykcolor fill
  744.     15 0 boxit 0 0 0 .5 setcmykcolor fill
  745.     30 0 boxit 1 1 0 0 setcmykcolor fill
  746.     45 0 boxit 1 0 1 0 setcmykcolor fill
  747.     60 0 boxit 0 1 1 0 setcmykcolor fill
  748.     75 0 boxit 1 1 1 0 setcmykcolor fill
  749.     1 SG
  750.     33 -6 moveto (CM) show
  751.     48 -6 moveto (CY) show
  752.     63 -6 moveto (MY) show
  753.     77 -6 moveto (CMY) show
  754.     grestore
  755.  
  756.  
  757.     0 0 0 1 setcmykcolor -6 9 moveto (K) show
  758.     0 1 9 {dup 15 mul 15 boxit 10 div 0 0 0 4 -1 roll setcmykcolor fill}for
  759.  
  760.     1 0 0 0 setcmykcolor -6 -6 moveto (C) show
  761.     0 1 9 {dup 15 mul 0 boxit 10 div 0 0 0 setcmykcolor fill}for
  762.  
  763.     0 1 0 0 setcmykcolor 154 9 moveto (M) show
  764.     0 1 9 {dup 15 mul 160 add 15 boxit 10 div 0 exch 0 0 setcmykcolor fill}for
  765.  
  766.     0 0 1 0 setcmykcolor 154 -6 moveto (Y) show
  767.     0 1 9 {dup 15 mul 160 add 0 boxit 10 div 0 0 3 -1 roll 0 setcmykcolor fill}for
  768.  
  769.    }if
  770.  
  771.   sepmode 4 eq {
  772.     320 0 translate
  773.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  774.    }if
  775.  
  776.   grestore
  777. }def
  778.  
  779. %
  780. % title1 title2 tilew tileh PRINTERSMARKS -
  781. %
  782. /PrintersMarks {
  783.  /tileh xdef
  784.  /tilew xdef
  785.  /title2 xdef
  786.  /title1 xdef
  787.  
  788.  gsave 0 SG [] 0 setdash 0 setlinejoin 0 setlinecap
  789.  
  790.  180 0 0 cropmark
  791.  270 tilew 0 cropmark
  792.  0 tilew tileh cropmark
  793.  90 0 tileh cropmark
  794.  
  795.  0 15 bv add tilew 2 div tileh regmark
  796.  0 -15 bv sub tilew 2 div 0 regmark
  797.  
  798.  -15 bh sub -15 bv sub 0 0 slurgauge
  799.  15 bh add 15 bv add tilew tileh slurgauge
  800.  
  801.   gsave 1 tilescalex div 1 tilescaley div scale -15 bh sub 8 translate 90 rotate
  802.   /Courier findfont 8 scalefont setfont
  803.   0 0 moveto title1 show
  804.   0 -8 moveto title2 show (  ) show
  805.   currentscreen pop exch 20 string cvs show ( lpi  ) show
  806.   20 string cvs show (\312  ) show
  807.   tilescalex 100 mul 20 string cvs show (%) show
  808.   tilescaley tilescalex ne {(,) show tilescaley 100 mul 20 string cvs show (%) show}if
  809.   grestore
  810.  
  811.  90 bh 15 add 15 tilew 0 colorstrip
  812.  grestore
  813. }bdef
  814.  
  815. %
  816. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) title left top right bottom THUMBNAILMARKS -
  817. %
  818. /ThumbnailMarks {
  819.  /tiley2 xdef
  820.  /tilex2 xdef
  821.  /tiley1 xdef
  822.  /tilex1 xdef
  823.  /title1 xdef
  824.  
  825.  cmatrix setmatrix
  826.  .5 SG 6 setlinewidth
  827.  newpath
  828.  tilex1 3 add tiley2 3 sub moveto
  829.  tilex2 3 add tiley2 3 sub lineto
  830.  tilex2 3 add tiley1 3 sub lineto stroke
  831.  
  832.  0 SG [] 0 setdash .3 setlinewidth 0 setlinejoin 0 setlinecap
  833.  newpath tilex1 tiley1 moveto tilex2 tiley1 lineto tilex2 tiley2 lineto tilex1 tiley2 lineto closepath stroke
  834.  
  835.  gsave tilex1 tilex2 add 2 div tiley2 translate 1 tilescalex div 1 tilescaley div scale -2 -6 bv sub translate
  836.  /Courier findfont 6 scalefont setfont
  837.  0 0 moveto title1 show
  838.  grestore
  839.  
  840.  installcolor
  841. }bdef
  842.  
  843. %
  844. % - ENDTILE -
  845. %
  846. /EndTile {
  847. }bdef
  848.  
  849. %
  850. % - BEGINCLIP -
  851. %
  852. /BeginClip {/PGSClipSave save def clip}bdef
  853.  
  854. %
  855. % - ENDCLIP -
  856. %
  857. /EndClip {PGSClipSave restore}bdef
  858.  
  859. %
  860. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINBITMAP -
  861. %
  862. /BeginBitmap {
  863.  /bpp xdef /h xdef /w xdef
  864.  scl translate scale save /picstr 8 bpp idiv dup w add 1 sub exch idiv string def
  865.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind image
  866. }bdef
  867.  
  868. %
  869. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINRGBBITMAP -
  870. %
  871. /BeginRGBBitmap {
  872.  /bpp xdef /h xdef /w xdef
  873.  scl translate scale save /picstr 8 bpp idiv dup w 3 mul add 1 sub exch idiv string def
  874.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind false 3 colorimage
  875. }bdef
  876.  
  877. %
  878. % - ENDBITMAP -
  879. %
  880. /EndBitmap {restore omatrix setmatrix}bdef
  881.  
  882. %
  883. % xscalex yscale xoffset yoffset BEGINEPS -
  884. %
  885. /BeginEPS {
  886.  scl translate scale translate
  887.  /PGSEPSSave save def /showpage {}bdef
  888.  newpath [] 0 setdash 1 setlinewidth 0 setgray
  889. }bdef
  890.  
  891. %
  892. % - ENDEPS -
  893. %
  894. /EndEPS {PGSEPSSave restore}bdef
  895.  
  896. end
  897. %%EndProlog
  898.